package week5.example;

import week5.example.Coin;

//*************************************************************************************************
//  CoinFlip.java   Author:Duanzhixuan
//
//  Demonstrates the use of an if-else statement.
//*************************************************************************************************
public class CoinFlip
{
     //-----------------------------------------------------------------------------------------------
     //  Creates a Coin object, flips it, and prints the results.
     //-----------------------------------------------------------------------------------------------
    public static void main(String[] args)
{
    Coin myCoin = new Coin();

    myCoin.flip();

   System.out.println(myCoin);

 if (myCoin.isHeads())
   System.out.println("You win.");
else 
  System.out.println("Better luck next timer.");
}
}
